package com.miyuan.view.replenish;

import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.support.annotation.Nullable;

import com.miyuan.R;
import com.miyuan.base.BaseActivity;

/**
 * 补货完成
 */

public class ReplenishFinishActivity extends BaseActivity {
    ReplenishFinishFragment replenishFinishFragment;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        setLayout(R.layout.fragment_root);
        super.onCreate(savedInstanceState);

        FragmentManager fm = getFragmentManager();
        FragmentTransaction transaction = fm.beginTransaction();
        replenishFinishFragment = ReplenishFinishFragment.newInstance(getIntent().getStringExtra("QrResult"));
        transaction.replace(R.id.root_fragment, replenishFinishFragment);
        transaction.addToBackStack("replenishFinishFragment");
        transaction.commit();
    }

    @Override
    public void onBackPressed() {
        finish();
    }
}
